package com.lechi.web.vo;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import java.io.Serializable;

/**
 * 网关类型对象 iot_gateway
 *
 * @author yangguang
 * @date 2024 -03-20
 */
@Data
public class IotGatewayVo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private Long id;

    /**
     * 网关名称
     */
    @NotBlank(message = "gatewayName字段不能为空")
    @Length(max = 50, message = "网关名称gatewayName长度不能大于{max}")
    private String gatewayName;

    /**
     * 网关编码
     */
    private String gatewayNode;

    /**
     * 备用状态字段
     */

    private String status;


    /**
     * Socket服务端口
     */
    @NotNull(message = "参数port不能为空")
    @Range(min = 4000, max = 8000)
    private Long port;

    /**
     * Socket服务执行线程数
     */
    @NotNull(message = "参数thread不能为空")
    @Range(min = 10, max = 100)
    private Long thread;

    /**
     * 心跳检测超时时间(单位：毫秒)
     */
    @NotNull(message = "参数heartBeatTime不能为空")
    @Range(min = 60, max = 1000)
    private Long heartBeatTime;

    /**
     * 备用字段
     */

    private String note;
}
